﻿<%@ Page Title="" Language="C#" MasterPageFile="~/admin/MasterPage_admin.master" AutoEventWireup="true" CodeFile="UserNanager.aspx.cs" Inherits="admin_Default" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MenuHai" Runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="Content" Runat="Server">
    <h2>
        Danh Sách Người Dùng</h2>
    <div>
        
        Username:
        <asp:TextBox ID="TxtUsername" runat="server"></asp:TextBox>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Tên Người 
        Dùng:
        <asp:TextBox ID="TxtName" runat="server"></asp:TextBox>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Số Điện Thoại:
        <asp:TextBox ID="TxtPhone" runat="server" type="Phone"></asp:TextBox>
        <br />
        <br />
        Email:
        <asp:TextBox ID="TxtEmail" runat="server" type="Email"></asp:TextBox>
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        Ngày đăng ký:
        <asp:TextBox ID="TxtDateStart" runat="server"></asp:TextBox>
&nbsp; đến&nbsp;
        <asp:TextBox ID="TxtDateEnd" runat="server"></asp:TextBox>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <asp:Button ID="BtnSearch" runat="server" Height="26px" Text="Tìm Kiếm" 
            onclick="BtnSearch_Click" />
        <br />
        <br />
        
    </div>
    <asp:GridView ID="gvNguoiDung" runat="server" AutoGenerateColumns="False" CellPadding="3"
        GridLines="Vertical" Width="1114px"
        BackColor="White" BorderColor="#999999" BorderStyle="None" BorderWidth="1px"
        DataKeyNames="UserName" onrowdeleting="gvNguoiDung_RowDeleting" 
        onrowcancelingedit="gvNguoiDung_RowCancelingEdit" 
        onrowediting="gvNguoiDung_RowEditing" onrowupdating="gvNguoiDung_RowUpdating">
        <AlternatingRowStyle BackColor="#DCDCDC" />
        <Columns>
            <asp:BoundField DataField="UserName" HeaderText="Username" ReadOnly="True">
                <HeaderStyle HorizontalAlign="Center" VerticalAlign="Top" Width="200px" />
                <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
            </asp:BoundField>
            <asp:TemplateField HeaderText="Tên Người Dùng">
                <EditItemTemplate>
                    <asp:TextBox ID="TBTen" runat="server" Height="15px" MaxLength="120" Text='<%# Bind("HoTen") %>'></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TBTen"
                        Display="None" ErrorMessage="Tên người dùng không được bỏ trống" ValidationGroup="updatenh"></asp:RequiredFieldValidator>
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:Label ID="Label1" runat="server" Text='<%# Bind("HoTen") %>'></asp:Label>
                </ItemTemplate>
                <HeaderStyle HorizontalAlign="Center" VerticalAlign="Top" />
                <ItemStyle HorizontalAlign="Left" VerticalAlign="Middle" />
            </asp:TemplateField>
            <%--<asp:BoundField DataField="HoTen" HeaderText="" >
            <HeaderStyle HorizontalAlign="Left" VerticalAlign="Middle" />
            </asp:BoundField>--%>
            <asp:BoundField DataField="DienThoai" HeaderText="Số Điện Thoại" 
                ReadOnly="True" >
            <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />
            <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="120px" />
            </asp:BoundField>
            <asp:BoundField DataField="Email" HeaderText="Email" ReadOnly="True" >
            <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />
            <ItemStyle HorizontalAlign="Left" VerticalAlign="Middle" />
            </asp:BoundField>
            <asp:BoundField DataField="NgayDK" HeaderText="Ngày ĐK" ReadOnly="True" >
            <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />
            <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="140px" />
            </asp:BoundField>
            <asp:CheckBoxField DataField="Lock" HeaderText="Khóa">
            <HeaderStyle HorizontalAlign="Center" VerticalAlign="Middle" />
            <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="50px" />
            </asp:CheckBoxField>
            <asp:TemplateField>
                <EditItemTemplate>
                    <asp:Button ID="btnUpdate" runat="server" CausesValidation="True" CommandName="Update"
                        Text="Cập Nhật" ValidationGroup="updatenh" />
                    &nbsp;<asp:Button ID="btnCancle" runat="server" CausesValidation="False" CommandName="Cancel"
                        Text="Cancel" />
                </EditItemTemplate>
                <ItemTemplate>
                    <asp:Button ID="btnEdit" runat="server" CausesValidation="False" CommandName="Edit"
                        Text="Sửa" />
                    &nbsp;<asp:Button ID="btnDelete" runat="server" CausesValidation="False" CommandName="Delete"
                        OnClientClick="return confirm(&quot;Bạn có thực sự muốn xóa?&quot;);" Text="Xóa" />
                </ItemTemplate>
                <HeaderStyle HorizontalAlign="Center" VerticalAlign="Top" Width="120px" />
                <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
            </asp:TemplateField>
        </Columns>
        <FooterStyle BackColor="#CCCCCC" ForeColor="Black" />
        <HeaderStyle BackColor="#000084" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="#999999" ForeColor="Black" HorizontalAlign="Center" />
        <RowStyle BackColor="#EEEEEE" ForeColor="Black" />
        <SelectedRowStyle BackColor="#008A8C" Font-Bold="True" ForeColor="White" />
        <SortedAscendingCellStyle BackColor="#F1F1F1" />
        <SortedAscendingHeaderStyle BackColor="#0000A9" />
        <SortedDescendingCellStyle BackColor="#CAC9C9" />
        <SortedDescendingHeaderStyle BackColor="#000065" />
    </asp:GridView>
    <br />
</asp:Content>

